/**
 * @program: yygh_parent
 * @ClassName UserController
 * @description:
 * @author: zyw
 * @create: 2023-05-18 08:59
 * @Version 1.0
 **/
package com.atguigu.yygh.hosp.controller.admin;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.model.acl.User;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/user")
public class AdminUserController {

    @PostMapping("/login")
    public R login(@RequestBody User user) {
        return R.ok().data("token", "admin-token");
    }

    @GetMapping("/info")
    public R info(String token) {
        return R.ok().data("role","[admin]")
                .data("introduction","i am a super administrator")
                .data("avatar","https://cn.bing.com/images/search?q=%E7%8C%AB%E5%92%AA%E5%8A%A8%E5%9B%BE&FORM=IQFRBA&id=8C36411B2D3A587FA8AC8C83AF0788547E999301")
                .data("name","Super Admin");
    }
}
 
